<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>关键帧动画</title>
    <style>
        @keyframes a1{
            0%{
                width:100px;
            }
            50%{
                /*background:green;*/
                width:300px;
            }
            100%{
                width:700px;
            }
        }

        @keyframes a2{
            50%{
                transform:scaleY(0.5);
            }
        }

        div{
            width:10px;
            height:50px;
            background:red;
            margin-top:100px;
            float:left;
            margin-right:10px;
            animation:a2 1s infinite;
        }
        div:nth-of-type(2){
            animation-delay:.2s;
        }
        div:nth-of-type(3){
            animation-delay:.4s;
        }
        div:nth-of-type(4){
            animation-delay:.6s;
        }
        div:nth-of-type(5){
            animation-delay:.8s;
        }
        div:nth-of-type(6){
            animation-delay:1s;
        }
    </style>
</head>
<body>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
</body>
</html>
